The present invention relates generally to content rendering environments (such as browsers and portals), and more particularly, enables scripting code within applications executing in such environments to provide synchronized operation.
Advanced script-based technologies have been used commonly and ubiquitously to build web applications because of their sophisticated features and small download footprint. Most browsers, including Internet Explorer, Mozilla, and Opera, have embraced the scripting technologies to allow advanced manipulation of the Document Object Model (“DOM”) structures in which parsed data is stored for rendering.
While scripting provides a number of advantages, it also has drawbacks. Among these drawbacks is the lack of various safety features, as contrasted to compiled languages, such as type checking and even syntax checking. The threading model also differs among compiled languages and scripting technologies: whereas compiled languages typically allow multi-threading, scripting technologies typically do not.
When designing web applications for browser-based rendering, it is quite common for a designer to create an application that has multiple browser instances coexisting. For example, if a user selects a “Help” button graphic from a browser instance, the designer may implement the Help feature to pop up a separate browser window for rendering Help text. An application might also have multiple browser instances sharing data or communicating with each other by transferring data back and forth. However, unlike other high-level programming languages, scripting languages typically have a single-threaded execution model, and have no synchronization primitives (such as locks and semaphores) to ensure orderly data sharing and transfer. This can be further complicated by the use of native, multi-threaded methods which are called outside of the scripting model, and which create and modify browser instance data.